<%= dropdown do %>
  <%= dropdown_toggle class: 'btn-light dropdown-toggle' do %>
    <span class="text-muted font-weight-normal mr-1">
      <%= Spree.t(:status) %>
    </span>
    <%= promotion_filter_dropdown_value %>
  <% end %>
  <%= dropdown_menu do %>
    <%= active_link_to 'All Promotions', params.to_unsafe_h.deep_merge({page: nil, q: {active: nil, expired: nil}}), class: 'dropdown-item', active: (params[:q] || {}).values_at(*%w[expired active] ).all?(&:blank?) %>
    <%= link_to Spree.t(:expired),
      params.to_unsafe_h.deep_merge({page: nil, q: {active: nil, expired: true}}),
      class: "dropdown-item #{'active' if params[:q][:expired]}" %>
    <%= link_to Spree.t(:active),
      params.to_unsafe_h.deep_merge({page: nil, q: {active: true, expired: false}}),
      class: "dropdown-item #{'active' if params[:q][:active]}" %>
  <% end %>
<% end %>
